A document's presentation, ie. its look and feel, is represented by a combination of its layout, formatting and content. For the sake of brevity, the layout, formatting and content of a document shall be referred to in this specification, unless the context clearly indicates otherwise, as the “document configuration”.
A document's layout refers to the geometric arrangement of blocks comprising the document, sizes of the blocks, their aspect ratios and the distances between them. A block is a zone in which text appears or which contains an image. A block is referred to as a copy-hole or a placeholder.
A document's formatting refers to the choice of text font types, font styles, font sizes and font colors, or the like of text to be placed in those blocks.
A document's content refers to fixed data present in a template from which the document is generated as well as variable data merged with the template to produce a custom document.
In custom publishing, many situations arise where one may want to automatically adjust the layout either of a template used for generating the document or the instance custom document itself. Examples of such situations include:    1. to correct layout errors resulting from changes in the properties of the variable data. For example:            a. a template block could be too small or too big for an image; or the image and the block may have different aspect ratios; or        b. a block for a text box may be too small for the amount of text in the variable data;            2. to reuse a template for a different purpose. For example, one may want to reuse a template that produces a postcard to produce a poster, or to reuse a template that produces a document of 4 pages to produce a document of 6 pages;    3. to adjust the style of a document/template to better match the style requirements of a specific tradeshow or that of a specific dealer.
In all of these cases and others, a graphic artist typically creates a template with an optimized layout. The layout is optimized for variable data with specific properties (certain amount of text, images with certain sizes and aspect ratios, etc.) and specific style requirements. If the customer wanted to reuse the template for data with different properties, or wanted to reuse it for a different purpose, he or she, typically, would be forced to go back to the graphic artist for a new template, costing a significant amount of time and money. It is extremely cost and time efficient if the template or the produced custom document could be automatically adjusted either to correct layout errors or for reuse purposes.
The kinds of documents/templates that predominantly show configuration adjustment problems are so called “layout driven” document/templates. Layout driven documents are characterized by a rigid layout of blocks with fixed sizes and positions. Any content must fit its allocated block. Examples of layout driven templates include real estate and other advertisements and flyers, product catalogs, newspapers and magazines. Layout driven templates can be contrasted with “content driven” or flow based templates that are characterized by content flowing from page to page without a rigid block layout structure. Examples of content driven documents are technical reports, research papers, product data sheets, brochures, etc. Most documents have both layout driven as well as content driven properties. This invention is mainly applicable to templates/documents that are predominantly layout driven. While adjusting a document, it is necessary to minimize the change in its look and feel as much as possible or at least keep it in an acceptable range. While doing layout adjustment, it is necessary to preserve the look and feel of the original layout as much as possible. This is because the graphic artist produces the original layout by considering various factors such as aesthetics, branding and style requirements and optimizes the template to cater for these factors. Venturing too far away from the original look and feel can lead to templates or documents that are aesthetically unpleasant and/or nonconforming to the branding or style requirements.